<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <a href="http://127.0.0.1:5500/a.json" download="a.txt">文件下载</a>
    <script>
        // 创建二进制文件流
        // var b1 = new Blob(["helloworld"])
        // var tempURL = window.URL.createObjectURL(b1);


        // // 设置a标签
        // var file = document.querySelector("#file")
        // file.download = "这是一个牛逼的文件.txt"
        // file.href = tempURL
    </script>
</body>
</html>